#include "ExtractorClaveRegVariable.h"

ExtractorClaveRegVariable::ExtractorClaveRegVariable() {

}

ExtractorClaveRegVariable::~ExtractorClaveRegVariable() {

}

Bytes ExtractorClaveRegVariable::extraerClave(Bytes dato) {
	offset offset = 0;

	int tamanioString;
	dato.leer(&tamanioString,offset,sizeof(int));
	offset += sizeof(int);

	return dato.getSubBytes(offset,tamanioString).toString();
}

Key ExtractorClaveRegVariable::crearClave(Bytes clave) {
	return Key(new ClaveString(clave.toString()));
}
